package org.example.entity;

import lombok.Data;

@Data
public class Hero {
    private String name;
    private Horse horse;
    private Sword sword;

    public void goAndSee(){
        System.out.println("大侠行走江湖");
        horse.run();
    }

    public void getNo1(){
        System.out.println("我要成为武林霸主");
        horse.run();
        sword.attack();
    }
}
